﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace Sbook.Data
{
    public class DeliveryDetailInfo
    {
        private string deliveryId;

        public string DeliveryId
        {
            get { return deliveryId; }
            set { deliveryId = value; }
        }

        private string productId;

        public string ProductId
        {
            get { return productId; }
            set { productId = value; }
        }

      

        private string pName;

        public string PName
        {
            get { return pName; }
            set { pName = value; }
        }

        private string pCode;

        public string PCode
        {
            get { return pCode; }
            set { pCode = value; }
        }

        private string qty;

        public string Qty
        {
            get { return qty; }
            set { qty = value; }
        }

        //private string uom;

        //public string Uom
        //{
        //    get { return uom; }
        //    set { uom = value; }
        //}

        private string location;

        public string Location
        {
            get { return location; }
            set { location = value; }
        }

        private string shippingPoint;

        public string ShippingPoint
        {
            get { return shippingPoint; }
            set { shippingPoint = value; }
        }

        private string price;

        public string Price
        {
            get { return price; }
            set { price = value; }
        }

        private string remark;

        public string Remark
        {
            get { return remark; }
            set { remark = value; }
        }

        private string orderType;

        public string OrderType
        {
            get { return orderType; }
            set { orderType = value; }
        }

        private string deliveryDate;

        public string DeliveryDate
        {
            get { return deliveryDate; }
            set { deliveryDate = value; }
        }

        private string total;

        public string Total
        {
            get { return total; }
            set { total = value; }
        }

        public DeliveryDetailInfo DeliveryDetailIDataReader(IDataReader dr)
        {
            Data.DeliveryDetailInfo obj = new Data.DeliveryDetailInfo();
            obj.DeliveryId = (dr["DeliveryId"] is DBNull) ? string.Empty : dr["DeliveryId"].ToString();
            obj.ProductId = (dr["ProductId"] is DBNull) ? string.Empty : dr["ProductId"].ToString();
            //obj.PName = (dr["PName"] is DBNull) ? string.Empty : dr["PName"].ToString();
            //obj.PCode = (dr["PCode"] is DBNull) ? string.Empty : dr["PCode"].ToString();
            //obj.PName = (dr["PName"] is DBNull) ? string.Empty : dr["PName"].ToString();
            obj.Qty = (dr["Quantity"] is DBNull) ? string.Empty : dr["Quantity"].ToString();
            //obj.Uom = (dr["Uom"] is DBNull) ? string.Empty : dr["Uom"].ToString();
            obj.Location = (dr["Location"] is DBNull) ? string.Empty : dr["Location"].ToString();
            //obj.ShippingPoint = (dr["DeliveryShippingPoint"] is DBNull) ? string.Empty : dr["DeliveryShippingPoint"].ToString();
            obj.Price = (dr["Price"] is DBNull) ? string.Empty : dr["Price"].ToString();
            obj.Remark = (dr["Remark"] is DBNull) ? string.Empty : dr["Remark"].ToString();
            //obj.OrderType = (dr["PaymentId"] is DBNull) ? string.Empty : dr["PaymentId"].ToString();
            //obj.DeliveryDate = (dr["DeliveryDate"] is DBNull) ? string.Empty : dr["DeliveryDate"].ToString();
            //obj.Total = (dr["Total"] is DBNull) ? string.Empty : dr["Total"].ToString();
            return obj;
        }
    }
}